﻿using cmdb.keede.entity;
using System;
using System.Collections.Generic;
using System.Text;

namespace cmdb.keede.data
{
    public class DatabaseFactory : Disposable, IDatabaseFactory
    {
        private CMDBContext dataContext;
        public CMDBContext Get()
        {
            return dataContext ?? (dataContext = new CMDBContext());
        }
        protected override void DisposeCore()
        {
            dataContext?.Dispose();
        }
    }
}
